![]() PDD file (329K) |
![]() ClarisWorks 4 file (54K) |
![]() not available yet |
Technote 1028 | FEBRUARY 1996 |
This Note is intended for Macintosh QuickDraw GX developers who are using any version of QuickDraw GX up to and including 1.1.3.
Contents
Important for all Apple Printing and Graphics Developers:
The information in this Technote is still relevant up to and including Mac OS 7.6 with QuickDraw GX 1.1.5. Beginning with the release of Mac OS 8.0, however, Apple plans to deliver a system which incorporates QuickDraw GX graphics and typography only. QuickDraw GX printer drivers and GX printing extensions will not be supported in Mac OS 8.0 or in future Mac OS releases. Apple's goal is to simplify the user experience of printing by unifying the Macintosh graphic and printing architectures and standardizing on the classic Printing Manager. For details on Apple's official announcement, refer to </technotes/gxchange.html> |
This is how the QuickDraw GX gestalt 'qdgx' works:
Table 1 shows you version gestalt values for QuickDraw GX.
Table 1: Gestalt values for QuickDraw GX
'qdgx' Value GX Version 0x00010000 GX 1.0 0x00010001 GX 1.0.1 0x00010002 GX 1.0.2 0x00010100 GX 1.1 0x00010101 GX 1.1.1 0x00010102 GX 1.1.2 0x00010103 GX 1.1.3
gxShapeType GXGetShapeClipType(gxShape source) source A reference to the shape you want to examine the clip property of. function result: A reference to the clip shape type.
The clip shape, which you specify using the clip parameter, may be a geometric shape, a bitmap shape, or a glyph shape. In the current implementation , it may not be a picture, text, or layout shape.
enum { gxNeedsHexOption = 0x00000001, gxNeedsCommentsOption = 0x00000002, gxBoundingBoxesOption = 0x00000004, gxPortablePostScriptOption = 0x00000008, gxUseLevel2ColorOption = 0x00000080, gxNoEPSIllegalOperators = 0x00000100, gxEPSTargetOption = gxNoEPSIllegalOperators + gxNeedsCommentsOption + gxBoundingBoxesOption }; typedef long gxPostScriptRenderOptions;
gxNoEPSIllegalOperators The driver should only emit operators that are allowed by Encapsulated PostScript specifications (Version 3.0). gxEPSTargetOption The driver should issue PostScript intended for EPS use.For descriptions of other constants, please see Inside Macintosh: QuickDraw GX Printing Extensions and Drivers , p. 4-27.
OSErr MySetupPageImageData(gxFormat theFormat, gxShape thePage, void *imageData); theFormat The format object for the page. thePage A reference to the page shape. imageData A pointer to imaging-specific data for initializing the printing device. function result: An error code. The value noErr indicates that the operation was successful.
gxSegmentLoadFailedErr A required code segment could not be found, or there was not enough memory to load it. gxPrUserAbortErr The user has canceled printing.
OSErr MyPostScriptEjectPendingPage(Boolean *pageWasEjected) *pageWasEjected A pointer to a Boolean value. On return, the value is true if a page was ejected and false otherwise. function result: An error code. The value noErr indicates that the operation was successful.
gxSegmentLoadFailedErr A required code segment could not be found, or there was not enough memory to load it. gxPrUserAbortErr The user has canceled printing.
OSErr MyGXHandleAltDestination (Boolean *userCancels) *userCancels A pointer to a Boolean value. On return, the value is true if the user cancels. function result: An error code. The value noErr indicates that the operation was successful.
In order to change the destination, you must have an alternate destination ('dsta') resource declared. For more information on the 'dsta' resource, continue reading this document.
gxSegmentLoadFailedErr A required code segment could not be found, or there was not enough memory to load it. gxPrUserAbortErr The user has canceled printing.
Figure 1: The alternate destination resource
destination name The Pascal string name to show in the print dialog pop-up menu. button text The Pascal string name to show in the "OK" button when the user selects the destination name from above in the pop-up menu.
Figure 2: The custom halftone matrix resource
dpix The dots per inch in the x direction. This is a fixed point value. dpiy The dots per inch in the y direction. This is a fixed point value. width The width of the matrix. height The height of the matrix. brick offset The tile shift.Each entry in the samples array is for a matrix that outlines a specific tile shift.
In order to make use of this resource, you must set the dither type of your 'rdip' resource to gxCustomDot.
For more information on the 'rdip' resource, please see Inside Macintosh: QuickDraw GX Printing Extensions and Drivers , p. 6-66.
Figure 3 shows the structure of the manual feed preferences resource.
Figure 3: The manual feed preferences resource
alertFlags A collection of flag values that you can combine together to specify when manual feed alerts will be shown. The first word is for a driver's private use.
Table 2: Flags used in the manual feed preferences resource
Constant Value Explanation gxShowAlerts 0x01 Tells GX to show alerts for this desktop printerThe default settings if no resource is found is gxDefaultMFeedAlertSettings (=gxShowAlerts | gxAlertOnPaperChange).
For more information on GXDefaultDesktopPrinter and GXWriteDTPData, see Inside Macintosh: QuickDraw GX Printing Extensions and Drivers .
See the section "The Desktop Printer Output Characteristics ('outp') Resource" in this document for more information on 'outp'.
Figure 4 shows the structure of the desktop printer output characteristics resource.
Figure 4: The desktop printer output characteristics resource
driverFlags Available for driver-defined options. outputSettings A collection of flag values that you can combine together to specify whether a printer is a device with a paper feed. Currently predefined with gxCanConfigureTrays or 0.
Table 3 Flags used in the manual feed preferences resource
Constant Value Explanation gxCanConfigureTrays 0x01 Desktop printer represents a device with a paper feedIf no 'outp' resource is found in the desktop printers, QuickDraw GX assumes that the desktop printer is tray-configurable and will display the manual feed and paper mismatch alerts.
For more information on GXDefaultDesktopPrinter and GXWriteDTPData, see Inside Macintosh: QuickDraw GX Printing Extensions and Drivers .
See the section "The Manual Feed Preferences ('mfpr') Resource" in this document for more information on 'mfpr'.
Fixed GXGetLayoutJustificationGap(gxShape layout) layout A reference to the layout shape whose information you need. function result: The signed difference between the specified width for the layout and the measured (unjustified) width.
shape_is_nil
void GXGetLayoutJustificationFactors(gxShape layout, Fixed constrainedFactors[], Fixed unconstrainedFactors[]) layout A reference to the layout shape whose information you need. constrainedFactors An array of Fixed values. On return, the array contains factors that represent the portions of available padding by priority (gxWhiteSpacePriority,..) that the layout ended up using in order to justify the line. unconstrainedFactors An array of Fixed values. On return, the array contains factors that represent the characters that were designated as being able to absorb unlimited gap. function result: The signed difference between the specified width for the layout and the measured (unjustified) width.
shape_is_nil
long GXGetFontDefaultFeatures(gxFont fontID, gxRunFeature features[]) fontID A reference to the font whose information you need. features On return, an array of the features for this font. function result: A list of the feature type/selector pairs that correspond to those features the font designates as default behaviors.
out_of_memory internal_font_error illegal_font_parameter